<template>
  <div>
    <div class="foot">
      <span
        v-for="(item, index) in shuju"
        :key="index"
        :class="{ active: act == index }"
        @click="qiehuan(index)"
      >
        {{ item }}
      </span>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyFooter",
  data() {
    return {
      act: 0,
      shuju: ["首页", "爆爆团", "订单", "我的"],
    };
  },
  methods: {
    qiehuan(index) {
      this.act = index;
    },
  },
};
</script>

<style lang="scss" scoped>
.foot {
  position: fixed;
  bottom: 0;
  border-top: 1px solid rgba(128, 128, 128, 0.529);
  width: 100%;
  height: 40px;
  // background-color: aqua;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.active {
  color: red;
}
</style>